app.controller("productDescController",function($scope,$location,goodsService,carService){
	var goodsId= $location.search().id;
	goodsService.loadProductById(goodsId).then(function success(response){
		console.log(response);
		$scope.goods=response.data.data;
	})
	$scope.categoryNames=["","手机数码","电脑办公","家具家电"];
	
	$scope.addGoods=function(id){
		carService.addGoods(id,$scope.qty).then(function success(response){
			console.log(response);
			alert(response.data.status);
		});
		
	}
});